﻿<UserControl
    x:Class="WinRTXamlToolkit.Sample.Views.WatermarkTextBoxTestView"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xc="using:WinRTXamlToolkit.Controls"
    xmlns:local="using:WinRTXamlToolkit.Sample.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition
                Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <xc:WatermarkTextBox
            WatermarkText="Type something..."
            Margin="0,0,20,0"
            VerticalAlignment="Center" />
        <TextBlock
            Style="{StaticResource TitleTextStyle}"
            TextAlignment="Center"
            Text="Default WatermarkTextBox with WatermarkText"
            Grid.Column="1"
            Margin="0,0,0,10"
            RenderTransformOrigin="0.5,0.5"
            HorizontalAlignment="Left"
            VerticalAlignment="Center">
        </TextBlock>
        <xc:WatermarkTextBox
            VerticalContentAlignment="Center"
            HorizontalContentAlignment="Left"
            Margin="0,0,20,0"
            Grid.Row="1"
            VerticalAlignment="Center">
            <xc:WatermarkTextBox.Watermark>
                <StackPanel
                    Orientation="Horizontal">
                    <TextBlock
                        Text="Type Here"
                        FontWeight="Bold"
                        Foreground="WhiteSmoke" />
                    <Path
                        Margin="10,0,0,0"
                        Width="60"
                        Height="20"
                        Stretch="Fill"
                        Fill="WhiteSmoke"
                        Data="M0,8 L60,8 60,0 C60,1 90,10 100,10 C90,10 60,19 60,20 L60,12 0,12 z" />
                </StackPanel>
            </xc:WatermarkTextBox.Watermark>
        </xc:WatermarkTextBox>
        <TextBlock
            Style="{StaticResource TitleTextStyle}"
            TextAlignment="Center"
            Text="Default WatermarkTextBox with (non-text) Watermark"
            Grid.Column="1"
            Margin="0,0,0,10"
            Grid.Row="1"
            RenderTransformOrigin="0.5,0.5"
            HorizontalAlignment="Left"
            VerticalAlignment="Center">
        </TextBlock>
        <xc:WatermarkTextBox
            WatermarkText="&gt;&gt; custom prompt... &lt;&lt;"
            Margin="0,0,20,0"
            Grid.Row="2"
            VerticalAlignment="Center">
            <xc:WatermarkTextBox.WatermarkTextStyle>
                <Style
                    TargetType="TextBlock">
                    <Setter
                        Property="Margin"
                        Value="{StaticResource TextControlBorderThemeThickness}" />
                    <Setter
                        Property="Padding"
                        Value="{StaticResource TextControlThemePadding}" />
                    <Setter
                        Property="HorizontalAlignment"
                        Value="Center" />
                    <Setter
                        Property="VerticalAlignment"
                        Value="Center" />
                    <Setter
                        Property="FontFamily"
                        Value="Consolas" />
                    <Setter
                        Property="FontSize"
                        Value="18" />
                    <Setter
                        Property="Foreground"
                        Value="Red" />
                    <Setter
                        Property="FontWeight"
                        Value="Black" />
                </Style>
            </xc:WatermarkTextBox.WatermarkTextStyle>
        </xc:WatermarkTextBox>
        <TextBlock
            Style="{StaticResource TitleTextStyle}"
            TextAlignment="Center"
            Text="WatermarkTextBox with custom WatermarkTextStyle"
            Grid.Column="1"
            Margin="0,0,0,10"
            Grid.Row="2"
            RenderTransformOrigin="0.5,0.5"
            HorizontalAlignment="Left"
            VerticalAlignment="Center">
        </TextBlock>
        <xc:WatermarkTextBox
            WatermarkText="Type something..."
            Margin="0,0,20,0"
            Grid.Row="3"
            Visibility="Collapsed"
            VerticalAlignment="Center" />
        <TextBlock
            Style="{StaticResource TitleTextStyle}"
            TextAlignment="Center"
            Text="Default WatermarkTextBox collapsed (for toolkit testing purposes)"
            Grid.Column="1"
            Margin="0,0,0,10"
            Grid.Row="3"
            RenderTransformOrigin="0.5,0.5"
            HorizontalAlignment="Left"
            VerticalAlignment="Center">
        </TextBlock>
    </Grid>
</UserControl>
